package com.yeung.exam;

import java.util.ArrayList;
import java.util.Scanner;

public class 马蜂窝_寻找峰值 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        ArrayList<Integer> price = new ArrayList<>();
//        while (sc.hasNextInt()) price.add(sc.nextInt());
        //【490， 300， 445， 1200， 1300， 900】
        String line = sc.nextLine();
        String[] strings = line.substring(0, line.length() - 1).substring(1).split("， ");

        for (String string : strings) {
            price.add(Integer.parseInt(string));
        }
        //
        if (price.size() < 3) {
            return;
        }
        for (int i = 1; i < price.size() - 1; i++) {
            int pre = price.get(i - 1);
            int cur = price.get(i);
            int next = price.get(i + 1);
            if ((cur < pre && cur < next) || (cur > pre && cur > next)) {
                System.out.println(i);
            }
        }

    }
}
